from userinfo import *
list1 = [1,2,3,4,5,6,7,8]
list2 = [[1,2],[3,4],[5,6],[7,8],[9,10]]
list3 = []
user1 = UserInfo('张三',18)
user2 = UserInfo('李四',19)
user3 = UserInfo('王二',31)
user4 = UserInfo('麻子',55)
user5 = UserInfo('赵六',72)
list3.append(user1);
list3.append(user2);
list3.append(user3);
list3.append(user4);
list3.append(user5);

list4 = [UserInfo('张三',18),UserInfo('李四',19),UserInfo('王二',31),UserInfo('麻子',55),UserInfo('赵六',72)]

def func1():
	for x in list1:
		print(x)
		#输出：
		#1
		#2
		#3
		#4
		#5
		#6
		#7
		#8
def func2():
	for x in list2:
	    print(x)
		#输出：
		#[1, 2]
		#[3, 4]
		#[5, 6]
		#[7, 8]
		#[9, 10]
def func3():
	for x in list3:
	    print('name:{0},age:{1}'.format(x.name,x.age))
		#输出：
		#name:张三,age:18
		#name:李四,age:19
		#name:王二,age:31
		#name:麻子,age:55
		#name:赵六,age:72
def func4():
	for x in list4:
	    print('name:{0},age:{1}'.format(x.name,x.age))
		#输出：
		#name:张三,age:18
		#name:李四,age:19
		#name:王二,age:31
		#name:麻子,age:55
		#name:赵六,age:72
#def func5():
#	for x in list2:
#	    print(x)
func2()